class Solution {
public:
    int multiply(int A, int B) {
        int ret = 0;
        while (B--)
        {
            ret += A;
        }
        return ret;
    }
};